#include <stdio.h>

int main(int argc, char *argv[]) {

    int a = 0, b = 0, c = 0, d = 0;
    for (int i = 100; i <= 999; i++)
    {
        a = i % 10;
        b = i / 10 % 10;
        c = i / 100 % 10;
        d = a * a * a + b * b * b + c * c * c;
        if(d==i){
            printf("%d\n", i);
        }
    }
    


    return 0;
}